package com.training.java.core.equals;


public class InstanceOfDemo {

	
		public static void main(String[] args) {
			
			
			Car1 carFord = new Car1("1234","Ford1","Focus");
			Car1 carFocus = new Car1("1234","Ford","Focus");
			
			//Comparing Cat1 with Car2 
			// Here boolean is defined because carsEqual will be true or false
					

			boolean carsEqual = carFord.equals(carFocus);
			System.out.println("Are the cars equal? "+ carsEqual);
			
			carsEqual = carFord.equals("Satya");//Satya is not actual object.
			System.out.println("Are the cars equal? "+ carsEqual);
			
		}

	}


